package seo;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import util.TimeOut;

public class LabMAin {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) {
		long start = System.currentTimeMillis(); 
		TimeOut timeOutSecond = TimeOut.getInstance();
		Document doc;
		try {
			doc = Jsoup.connect("http://mkyong.com").timeout(timeOutSecond.getTimeout() * 1000).get();
			
			System.out.println(doc.select("body").html());
			
		} catch (IOException e) {
			System.out.println("url non valider");
		}
		long elapsedTime = System.currentTimeMillis() - start;
		System.out.println(elapsedTime/1000F);
	}
}
